#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

int main()
{
	string s1;
	string s2;
	cin>>s1>>s2;
	int arr1[100]={0};
	int arr2[100]={0};
	int arr3[100]={0};
	if(s1<s2){
		swap(s1,s2);
	}
	int len=max(s1.size(),s2.size());
	for(int i=0;i<s1.size();i++){
		arr1[i]=s1[s1.size()-1-i]-'0';
	}
	for(int i=0;i<s2.size();i++){
		arr2[i]=s2[s2.size()-1-i]-'0';
	}
	for(int i=0;i<len;i++){//arr1>arr2
		if(arr1[i]<arr2[i]){
			arr3[i]=arr1[i]+10-arr2[i];
			arr2[i+1]+=1;
		}
		else{
			arr3[i]=arr1[i]-arr2[i];
		}
	}
    if(arr3[len-1]==0){
    	len-=1;
	}
	for(int i=len-1;i>=0;i--){
		cout<<arr3[i];
	}
	return 0;
}
